<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.prime.com.tr/ui">
    <ui:composition template="/view/retail/template.xhtml">
        <ui:define name="content">
            <f:view>
                <h:form>
                    <h:panelGroup style="right: 2px; position: absolute; top: 0;">
                        <p:commandButton  value="编辑" action="edit" ajax="false" style="padding: 0;margin: 0; height: 25px" ></p:commandButton>
                        <p:commandButton  value="删除" action="#{contactManager.remove}" ajax="false" style="padding: 0;margin: 0; height: 25px" ></p:commandButton>
                    </h:panelGroup>
                    <h1 class="ui-widget-header ui-corner-all"><h:outputText value="查看联系人"/></h1>

                    <h:panelGrid columns="4"  styleClass="ui-widget-content" title="基本信息" columnClasses="column1,column2,column3,column4">
                        <f:facet name="header" id="header" >
                            <h:outputText value="基本信息" styleClass="ui-widget-header ui-corner-all"/>
                        </f:facet>
                        <h:outputText value="姓氏:" styleClass="required"/>
                        <h:panelGroup>
                            <h:outputText value="#{contactManager.currentContact.surname}" title="Surname"/>
                            <h:outputText value="  (#{contactManager.currentContact.salutation})" title="Salutation"/>
                        </h:panelGroup>
                        <h:outputText value="名字:"/>
                        <h:outputText value="#{contactManager.currentContact.name}" title="Name"/>
                        <h:outputText value="公司:"/>
                        <h:outputText value="#{contactManager.currentContact.company}" title="Company"/>
                        <h:outputText value="生日:"/>
                        <h:outputText value="#{contactManager.currentContact.birthday}" title="Birthday">
                            <f:convertDateTime pattern="yyyy-MM-dd" />
                        </h:outputText>
                        <h:outputText value="结婚日期:"/>
                        <h:outputText value="#{contactManager.currentContact.marriageDate}" title="MarriageDate">
                            <f:convertDateTime pattern="yyyy-MM-dd" />
                        </h:outputText>
                        <h:outputText value="Type:"/>
                        <h:outputText value="#{contactManager.currentContact.type}" title="Type"/>

                    </h:panelGrid>
                </h:form>
            </f:view>

        </ui:define>
    </ui:composition>
</html>
